package com.example.myapplication;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import java.util.List;

@Dao
public interface MovieDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE) // 设置冲突处理策略
    void insertMovie(Movie movie);

    @Query("SELECT * FROM Movie")
    List<MainActivity.Movie> getAllMovies();
}